home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / python-support / python-dbus / dbus / dbus_bindings.py < prev    next >
Encoding:
Python Source  |  2009-02-22  |  1.1 KB  |  38 lines

  1. # Backwards-compatibility with the old dbus_bindings.
  2.  
  3. from warnings import warn as _warn
  4.  
  5. _dbus_bindings_warning = DeprecationWarning("""\
  6. The dbus_bindings module is not public API and will go away soon.
  7.  
  8. Most uses of dbus_bindings are applications catching the exception
  9. dbus.dbus_bindings.DBusException. You should use dbus.DBusException
  10. instead (this is compatible with all dbus-python versions since 0.40.2).
  11.  
  12. If you need additional public API, please contact the maintainers via
  13. <dbus@lists.freedesktop.org>.
  14. """)
  15.  
  16. _warn(_dbus_bindings_warning, DeprecationWarning, stacklevel=2)
  17.  
  18. # Exceptions
  19. from dbus.exceptions import DBusException
  20. class ConnectionError(Exception): pass
  21.  
  22. # Types
  23. from dbus.types import *
  24.  
  25. # Messages
  26. from _dbus_bindings import Message, SignalMessage as Signal,\
  27.                            MethodCallMessage as MethodCall,\
  28.                            MethodReturnMessage as MethodReturn,\
  29.                            ErrorMessage as Error
  30. # MessageIter has gone away, thankfully
  31.  
  32. # Connection
  33. from _dbus_bindings import Connection
  34.  
  35. from dbus import Bus
  36. bus_request_name = Bus.request_name
  37. bus_release_name = Bus.release_name
  38.